#include <iostream>
using namespace std;

int main()
{
	string a,b;
	while(cin>>a>>b)
	{
		int pos=0;
		bool flag=true;
		while(pos<a.length())
		{
			int k=b.find(a[pos]);
			if(k==string::npos)
			{
				flag=false;
				break;
			}
			pos++;
		}
		if(flag) cout<<"true"<<endl;
		else cout<<"false"<<endl;
	}
}
